package org.wevil.controller.pay;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wevil.service.pay.PaypalService;
import org.wevil.vo.Result;

import javax.annotation.Resource;

/**
 * paypal支付测试
 */
@RestController
@RequestMapping("paypal")
public class PaypalController {

    @Resource
    PaypalService paypalService;

    /**
     * 创建订单
     * @return paypal创建的订单id
     * */
    @PostMapping("/createOrder")
    public Result<String> createOrder(){
        return paypalService.createOrder();
    }
}
